const logPlugin = (store) => {
    // console.log(store) //根store实例
    store.subscribe((mutations, state) => {
        //这个回调函数只要在mutation触发的时候 就会被回调
        //mutations就是当前这的mutation类型和payload
        //state就是状态
        // console.log(mutations, state)

        //简单编写一个日志插件

        console.group("时间:" + new Date().toLocaleTimeString() + " mutation类型:%c" + mutations.type, 'color:red')
        console.log('荷载参数(payload', mutations.payload)
        console.log('state的值是', state)
        console.groupEnd()
    })
}

export default logPlugin